package com.com.nfIt.ch04;

import java.util.Random;

/**
 * ClossName:Xiaotou
 * Pakage:com.com.nfIt.ch04
 * Description
 *
 * @Author L
 * @Create 2024/3/14 11:16
 * @Version 2023.1.3
 */
public class Xiaotou {
    public void xt(Men men){
        Random random = new Random();
        int num = random.nextInt(11);

        if (num > 8){
            men.kai();
            System.out.println("偷盗成功!");
        }else if (men instanceof FangDaoMEN){
            Men men1 = new FangDaoMEN();
           ((FangDaoMEN) men1).xl();
            System.out.println("偷盗失败!");
        }

    }
}
